﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MovctesFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MovctesBE
        Dim tmpMovctes As MovctesBE = New MovctesBE()
        Try
            With tmpMovctes
                .AplicaA = convertDTFromDb.ConvertString(dr.Item("AplicaA"))
                .Atraso = convertDTFromDb.convertInt32(dr.Item("Atraso"))
                .Concepto = convertDTFromDb.ConvertString(dr.Item("Concepto"))
                .CondVta = convertDTFromDb.convertInt32(dr.Item("CondVta"))
                .CveCliente = convertDTFromDb.ConvertString(dr.Item("CveCliente"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .Folio = convertDTFromDb.ConvertString(dr.Item("Folio"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .Importe = convertDTFromDb.ConvertDecimal(dr.Item("Importe"))
                .Referencia = convertDTFromDb.ConvertString(dr.Item("Referencia"))
                .Saldo = convertDTFromDb.ConvertDecimal(dr.Item("Saldo"))
                .Vence = convertDTFromDb.convertDateTime(dr.Item("Vence"))
            End With
            Return tmpMovctes
        Catch ex As Exception
            Throw
        Finally
            tmpMovctes = Nothing
        End Try
    End Function
End Class
